package com.sumer.psychology.common.notification;

import com.sumer.psychology.common.schedule.JDKTimerJob;

/**
 * 执行消息侦听
 * <p/>
 * User: zhenguang.zhu
 * Date: 2014/8/22
 * Time: 15:31
 */
public class NotificationTimerJob extends JDKTimerJob {
    private NotificationApplicationService notificationApplicationService;

    public NotificationTimerJob(NotificationApplicationService notificationApplicationService) {
        this.notificationApplicationService = notificationApplicationService;
    }

    @Override
    public void run() {
        notificationApplicationService().publishNotifications();
    }

    public NotificationApplicationService notificationApplicationService() {
        return notificationApplicationService;
    }
}
